package com.d3.pomodoro.extensions

import android.content.res.Resources
import android.view.View

fun View.changeBackGroundByTheme(theme: Resources.Theme, paramInt: Int) {
    val ta = theme.obtainStyledAttributes(intArrayOf(paramInt))
    val resourceId = ta.getColor(0, 0)
    this.setBackgroundColor(resourceId)
    ta.recycle()
}